/**
 * Copyright 2005 The Apache Software Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.edi.runtime.Event
{
	import flash.events.Event;
	/**
	 * 与数据操作有关的事件 
	 * 
	 */	
	public class EDIDataEvent extends Event
	{
	
		public static const Data_RollingBefore:String = "Data_RollingBefore";
		public static const Data_RollingAfter:String = "Data_RollingAfter";
		public static const Data_UpdateAfter:String = "Data_UpdataAfter";
		public static const Data_Insert:String = "Data_Insert";
		public static const Data_Delete:String = "Data_Delete";
		public static const Data_Load:String = "Data_Load";

		private var _value:Object;
		private var _index:int;
		private var _ediTarget:Object;
		private var _tableName:String;
		public function EDIDataEvent(evn:String=Data_RollingBefore,bubbles:Boolean=false)
		{
			super(evn,bubbles);
		}
		
		
		/**
		 * 值，可能是整个表，也可能是某行 
		 * @param val
		 * 
		 */		
		public function set value(val:Object):void{_value=val;}
		public function get value():Object{return _value}
		
		/**
		 * 若当value为行时，index特指第几行。
		 * @param value
		 * 
		 */		
		public function set index(value:int):void{_index=value}
		public function get index():int{return _index;}
		
		/**
		 * eid目标组件，谁发送的事件。
		 * @param value
		 * 
		 */		
		public function set ediTarget(value:Object):void{_ediTarget=value;}
		public function get ediTarget():Object{return _ediTarget;}
		
		/**
		 * 表名 
		 * @param value
		 * 
		 */		
		public function set tableName(value:String):void{_tableName=value;}
		public function get tableName():String{return _tableName;}
		
	}
}